package com.dd.cloud.user.entity.pres;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 中药仓库表
 * </p>
 *
 * @author czg
 * @since 2022-05-09
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "药品表")
public class DrugsModel implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 中药模型表 记录中药材的基本情况
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 药房id
     */
    @Column(comment = "药房id")
    private Integer pharId;

    /**
     * 药房标识
     */
    @Column(comment = "药房标识")
    private Integer pharFlag;

    /**
     * 药材名称
     */
    @Column(length = 20, comment = "药材名称")
    private String herbName;

    /**
     * 药材编码
     */
    @Column(length = 20, comment = "药材编码")
    private String drugnum;

    /**
     * 药材名称拼音首字母
     */
    @Column(length = 20, comment = "药材名称拼音首字母")
    private String herbNamePinyin;

    /**
     * 药材繁体
     */
    @Column(length = 32, comment = "药材名繁体")
    private String herbNameTraditional;

    /**
     * 用法及注意事项
     */
    @Column(length = 100, comment = "用法及注意事项")
    private String precautions;

    /**
     * 规格
     */
    @Column(length = 100, comment = "规格")
    private String specification;

    /**
     * 药材单位
     */
    @Column(length = 10, comment = "药材单位")
    private String useUnit;

    /**
     * 药材类型 1药材原料 2中成药
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "药材类型 1药材原料 2中成药 3颗粒")
    private Integer type;

    /**
     * 状态 1有效 2禁用 -1删除
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "状态 1有效 3禁用 -1删除")
    private Integer status;

    /**
     * 药材别名
     */
    @Column(length = 512, comment = "药材别名")
    private String alias;

    /**
     * 药材别名拼音首字母
     */
    @Column(length = 1024, comment = "药材别名拼音首字母")
    private String aliasPinyin;

    /**
     * 药材别名繁体
     */
    @Column(length = 1024, comment = "药材别名繁体")
    private String aliasTraditional;

    /**
     * 备注
     */
    @Column(length = 100, comment = "备注")
    private String remarks;

    /**
     * 产地
     */
    @Column(length = 30, comment = "产地")
    private String origin;

    /**
     * 药材单价
     */
    @Column(decimalLength = 2, comment = "药材单价 分/g")
    private BigDecimal price;

    /**
     * 药材原价
     */
    @Column(decimalLength = 2, comment = "药材原价 分/g")
    private BigDecimal originalPrice;

    /**
     * 药材库存
     */
    @Column(decimalLength = 2, comment = "药材库存")
    private BigDecimal qty;

    /**
     * 操作人id-创建人id
     */
    @Column(comment = "操作人id")
    private Integer operId;

    /**
     * 创建日期
     */
    @Column(comment = "创建日期")
    private LocalDateTime createDate;

    /**
     * 第三方药材id
     */
    @Column(length = 40, comment = "第三方药材id")
    private String drugId;

    /**
     * 锁定库存
     */
    @Column(decimalLength = 2, comment = "锁定库存")
    private BigDecimal stockQty;

    /**
     * 颗粒类型
     */
    @Column(length = 10, comment = "颗粒类型")
    private String klType;

    /**
     * 颗粒单价
     */
    @Column(decimalLength = 2, comment = "颗粒单价 分")
    private BigDecimal klPrice;
}
